3.1.66 \(\int \frac {\cot ^3(c+d x)}{(a+a \sin (c+d x))^2} \, dx\) [66]

Optimal. Leaf size=65 \[ \frac {2 \csc (c+d x)}{a^2 d}-\frac {\csc ^2(c+d x)}{2 a^2 d}+\frac {2 \log (\sin (c+d x))}{a^2 d}-\frac {2 \log (1+\sin (c+d x))}{a^2 d} \]

[Out]

2*csc(d*x+c)/a^2/d-1/2*csc(d*x+c)^2/a^2/d+2*ln(sin(d*x+c))/a^2/d-2*ln(1+sin(d*x+c))/a^2/d

________________________________________________________________________________________

Rubi [A]
time = 0.04, antiderivative size = 65, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 2, integrand size = 21, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.095, Rules used = {2786, 78} \begin {gather*} -\frac {\csc ^2(c+d x)}{2 a^2 d}+\frac {2 \csc (c+d x)}{a^2 d}+\frac {2 \log (\sin (c+d x))}{a^2 d}-\frac {2 \log (\sin (c+d x)+1)}{a^2 d} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[Cot[c + d*x]^3/(a + a*Sin[c + d*x])^2,x]

[Out]

(2*Csc[c + d*x])/(a^2*d) - Csc[c + d*x]^2/(2*a^2*d) + (2*Log[Sin[c + d*x]])/(a^2*d) - (2*Log[1 + Sin[c + d*x]]
)/(a^2*d)

Rule 78

Int[((a_.) + (b_.)*(x_))*((c_) + (d_.)*(x_))^(n_.)*((e_.) + (f_.)*(x_))^(p_.), x_Symbol] :> Int[ExpandIntegran
d[(a + b*x)*(c + d*x)^n*(e + f*x)^p, x], x] /; FreeQ[{a, b, c, d, e, f, n}, x] && NeQ[b*c - a*d, 0] && ((ILtQ[
n, 0] && ILtQ[p, 0]) || EqQ[p, 1] || (IGtQ[p, 0] && ( !IntegerQ[n] || LeQ[9*p + 5*(n + 2), 0] || GeQ[n + p + 1
, 0] || (GeQ[n + p + 2, 0] && RationalQ[a, b, c, d, e, f]))))

Rule 2786

Int[((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_.)*tan[(e_.) + (f_.)*(x_)]^(p_.), x_Symbol] :> Dist[1/f, Subst[I
nt[x^p*((a + x)^(m - (p + 1)/2)/(a - x)^((p + 1)/2)), x], x, b*Sin[e + f*x]], x] /; FreeQ[{a, b, e, f, m}, x]
&& EqQ[a^2 - b^2, 0] && IntegerQ[(p + 1)/2]

Rubi steps

\begin {align*} \int \frac {\cot ^3(c+d x)}{(a+a \sin (c+d x))^2} \, dx &=\frac {\text {Subst}\left (\int \frac {a-x}{x^3 (a+x)} \, dx,x,a \sin (c+d x)\right )}{d}\\ &=\frac {\text {Subst}\left (\int \left (\frac {1}{x^3}-\frac {2}{a x^2}+\frac {2}{a^2 x}-\frac {2}{a^2 (a+x)}\right ) \, dx,x,a \sin (c+d x)\right )}{d}\\ &=\frac {2 \csc (c+d x)}{a^2 d}-\frac {\csc ^2(c+d x)}{2 a^2 d}+\frac {2 \log (\sin (c+d x))}{a^2 d}-\frac {2 \log (1+\sin (c+d x))}{a^2 d}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.05, size = 49, normalized size = 0.75 \begin {gather*} \frac {4 \csc (c+d x)-\csc ^2(c+d x)+4 \log (\sin (c+d x))-4 \log (1+\sin (c+d x))}{2 a^2 d} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[Cot[c + d*x]^3/(a + a*Sin[c + d*x])^2,x]

[Out]

(4*Csc[c + d*x] - Csc[c + d*x]^2 + 4*Log[Sin[c + d*x]] - 4*Log[1 + Sin[c + d*x]])/(2*a^2*d)

________________________________________________________________________________________

Maple [A]
time = 0.25, size = 49, normalized size = 0.75

method result size
derivativedivides \(\frac {-2 \ln \left (1+\sin \left (d x +c \right )\right )-\frac {1}{2 \sin \left (d x +c \right )^{2}}+\frac {2}{\sin \left (d x +c \right )}+2 \ln \left (\sin \left (d x +c \right )\right )}{d \,a^{2}}\) \(49\)
default \(\frac {-2 \ln \left (1+\sin \left (d x +c \right )\right )-\frac {1}{2 \sin \left (d x +c \right )^{2}}+\frac {2}{\sin \left (d x +c \right )}+2 \ln \left (\sin \left (d x +c \right )\right )}{d \,a^{2}}\) \(49\)
risch \(\frac {2 i \left (-i {\mathrm e}^{2 i \left (d x +c \right )}+2 \,{\mathrm e}^{3 i \left (d x +c \right )}-2 \,{\mathrm e}^{i \left (d x +c \right )}\right )}{d \,a^{2} \left ({\mathrm e}^{2 i \left (d x +c \right )}-1\right )^{2}}-\frac {4 \ln \left ({\mathrm e}^{i \left (d x +c \right )}+i\right )}{a^{2} d}+\frac {2 \ln \left ({\mathrm e}^{2 i \left (d x +c \right )}-1\right )}{a^{2} d}\) \(100\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(cot(d*x+c)^3/(a+a*sin(d*x+c))^2,x,method=_RETURNVERBOSE)

[Out]

1/d/a^2*(-2*ln(1+sin(d*x+c))-1/2/sin(d*x+c)^2+2/sin(d*x+c)+2*ln(sin(d*x+c)))

________________________________________________________________________________________

Maxima [A]
time = 0.28, size = 55, normalized size = 0.85 \begin {gather*} -\frac {\frac {4 \, \log \left (\sin \left (d x + c\right ) + 1\right )}{a^{2}} - \frac {4 \, \log \left (\sin \left (d x + c\right )\right )}{a^{2}} - \frac {4 \, \sin \left (d x + c\right ) - 1}{a^{2} \sin \left (d x + c\right )^{2}}}{2 \, d} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cot(d*x+c)^3/(a+a*sin(d*x+c))^2,x, algorithm="maxima")

[Out]

-1/2*(4*log(sin(d*x + c) + 1)/a^2 - 4*log(sin(d*x + c))/a^2 - (4*sin(d*x + c) - 1)/(a^2*sin(d*x + c)^2))/d

________________________________________________________________________________________

Fricas [A]
time = 0.37, size = 76, normalized size = 1.17 \begin {gather*} \frac {4 \, {\left (\cos \left (d x + c\right )^{2} - 1\right )} \log \left (\frac {1}{2} \, \sin \left (d x + c\right )\right ) - 4 \, {\left (\cos \left (d x + c\right )^{2} - 1\right )} \log \left (\sin \left (d x + c\right ) + 1\right ) - 4 \, \sin \left (d x + c\right ) + 1}{2 \, {\left (a^{2} d \cos \left (d x + c\right )^{2} - a^{2} d\right )}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cot(d*x+c)^3/(a+a*sin(d*x+c))^2,x, algorithm="fricas")

[Out]

1/2*(4*(cos(d*x + c)^2 - 1)*log(1/2*sin(d*x + c)) - 4*(cos(d*x + c)^2 - 1)*log(sin(d*x + c) + 1) - 4*sin(d*x +
 c) + 1)/(a^2*d*cos(d*x + c)^2 - a^2*d)

________________________________________________________________________________________

Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \frac {\int \frac {\cot ^{3}{\left (c + d x \right )}}{\sin ^{2}{\left (c + d x \right )} + 2 \sin {\left (c + d x \right )} + 1}\, dx}{a^{2}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cot(d*x+c)**3/(a+a*sin(d*x+c))**2,x)

[Out]

Integral(cot(c + d*x)**3/(sin(c + d*x)**2 + 2*sin(c + d*x) + 1), x)/a**2

________________________________________________________________________________________

Giac [A]
time = 4.13, size = 115, normalized size = 1.77 \begin {gather*} -\frac {\frac {32 \, \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 1 \right |}\right )}{a^{2}} - \frac {16 \, \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) \right |}\right )}{a^{2}} + \frac {a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - 8 \, a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )}{a^{4}} + \frac {24 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - 8 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 1}{a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2}}}{8 \, d} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cot(d*x+c)^3/(a+a*sin(d*x+c))^2,x, algorithm="giac")

[Out]

-1/8*(32*log(abs(tan(1/2*d*x + 1/2*c) + 1))/a^2 - 16*log(abs(tan(1/2*d*x + 1/2*c)))/a^2 + (a^2*tan(1/2*d*x + 1
/2*c)^2 - 8*a^2*tan(1/2*d*x + 1/2*c))/a^4 + (24*tan(1/2*d*x + 1/2*c)^2 - 8*tan(1/2*d*x + 1/2*c) + 1)/(a^2*tan(
1/2*d*x + 1/2*c)^2))/d

________________________________________________________________________________________

Mupad [B]
time = 6.53, size = 103, normalized size = 1.58 \begin {gather*} \frac {2\,\ln \left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\right )}{a^2\,d}-\frac {{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2}{8\,a^2\,d}-\frac {4\,\ln \left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )+1\right )}{a^2\,d}+\frac {\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{a^2\,d}+\frac {{\mathrm {cot}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2\,\left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )-\frac {1}{8}\right )}{a^2\,d} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(cot(c + d*x)^3/(a + a*sin(c + d*x))^2,x)

[Out]

(2*log(tan(c/2 + (d*x)/2)))/(a^2*d) - tan(c/2 + (d*x)/2)^2/(8*a^2*d) - (4*log(tan(c/2 + (d*x)/2) + 1))/(a^2*d)
 + tan(c/2 + (d*x)/2)/(a^2*d) + (cot(c/2 + (d*x)/2)^2*(tan(c/2 + (d*x)/2) - 1/8))/(a^2*d)

________________________________________________________________________________________